package cn.hznc.domain.entity;

import cn.hutool.db.DaoTemplate;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * @Author：Administrator
 * @Date：2023/9/17 23:00
 */
@Getter
@Setter
@Table(name = "t_tool_param_cache")
@TableName(value = "t_tool_param_cache")
public class ToolParamCacheEntity {

    /**
     * 主键
     */
    @Column(name = "id",type = MySqlTypeConstant.INT,length = 11,isKey = true,isAutoIncrement = true)
    @TableId(type = IdType.AUTO)
    private Integer id;

    @Column(name = "tool_no",type = MySqlTypeConstant.VARCHAR, length = 50)
    @TableField("tool_no")
    private String toolNo;

    @Column(name = "length",type = MySqlTypeConstant.DOUBLE, length = 14)
    @TableField("length")
    private Double length;

    @Column(name = "radius",type = MySqlTypeConstant.DOUBLE, length = 14)
    @TableField("radius")
    private Double radius;

    @Column(name = "shank_rfid",type = MySqlTypeConstant.VARCHAR, length = 150)
    @TableField("shank_rfid")
    private String shankRfid;

    @TableField(exist = false)
    private String assemblyToolRfid;

    @Column(name = "create_time", type = MySqlTypeConstant.DATETIME)
    @TableField("create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Column(name = "selected_flag",type = MySqlTypeConstant.TINYINT)
    @TableField("selected_flag")
    private Integer selectedFlag;

    @Column(name = "selected_sub_program",type = MySqlTypeConstant.VARCHAR , length = 150)
    @TableField("selected_sub_program")
    private String selectedSubProgram;

}
